/*
 * Auther:Guan Junming <junming.guan at kisters.cn> Created:12-Oct-2011 14:42:44 Company:Kisters AG
 */
package cn.eclass.servlet.admin;

import cn.eclass.bean.AdCategoryBean;
import cn.eclass.entity.AdCategoryEntity;
import cn.eclass.servlet.ActionFace;
import java.io.IOException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;

/**
 *
 * @author Guan Junming <junming.guan at kisters.cn>
 */
public class Index extends ActionFace {

    @Override
    public void doIndex() {
        AdCategoryBean adCategoryBean = new AdCategoryBean();
        List<AdCategoryEntity> adCategorys = adCategoryBean.list();
        try {
            request.setAttribute("adCategorys", adCategorys);
            request.getRequestDispatcher("/admin/index.jsp").forward(request, response);
        } catch (ServletException ex) {
            Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
